package com.littcore.saap.system.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import java.io.Serializable;

/**
 * <br>
 * Table:tenant_order<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since Oct 13, 2015 3:25:20 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "tenant_order", uniqueConstraints = @UniqueConstraint(columnNames = "ORDER_NO"))
public class TenantOrder implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Integer id;

	/**
	 * 订单编号.
	 */
	private String orderNo;

	/**
	 * 订单类型.
	 */
	private int orderType;

	/**
	 * 产品编号.
	 */
	private String productNo;

	/**
	 * 产品类型.
	 */
	private String productType;

	/**
	 * 租户ID.
	 */
	private int tenantId;

	/**
	 * 租户编号.
	 */
	private String tenantCode;

	/**
	 * 租户别名.
	 */
	private String tenantAlias;

	/**
	 * 隔离级别.
	 */
	private int isolatedMode;

	/**
	 * 价格.
	 */
	private int price;

	/**
	 * 购买份数.
	 */
	private int quantity;

	/**
	 * 总金额.
	 */
	private int amount;

	/**
	 * 状态.
	 */
	private int status;

	/**
	 * 创建人.
	 */
	private int createBy;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	/**
	 * 余额支付额.
	 */
	private int balanceUsed;

	/**
	 * 优惠券支付额.
	 */
	private int couponUsed;

	/**
	 * 付款通道.
	 */
	private String payChannel;

	/**
	 * 付款时间.
	 */
	private Date payDatetime;

	/**
	 * 交易号.
	 */
	private String tradeNo;

	/**
	 * 激活时间.
	 */
	private Date activateDatetime;

	public TenantOrder() {
	}

	public TenantOrder(String orderNo, int orderType, String productNo,
			String productType, int tenantId, String tenantCode,
			String tenantAlias, int isolatedMode, int price, int quantity,
			int amount, int status, int createBy, Date createDatetime,
			int balanceUsed, int couponUsed, String payChannel) {
		this.orderNo = orderNo;
		this.orderType = orderType;
		this.productNo = productNo;
		this.productType = productType;
		this.tenantId = tenantId;
		this.tenantCode = tenantCode;
		this.tenantAlias = tenantAlias;
		this.isolatedMode = isolatedMode;
		this.price = price;
		this.quantity = quantity;
		this.amount = amount;
		this.status = status;
		this.createBy = createBy;
		this.createDatetime = createDatetime;
		this.balanceUsed = balanceUsed;
		this.couponUsed = couponUsed;
		this.payChannel = payChannel;
	}

	public TenantOrder(String orderNo, int orderType, String productNo,
			String productType, int tenantId, String tenantCode,
			String tenantAlias, int isolatedMode, int price, int quantity,
			int amount, int status, int createBy, Date createDatetime,
			int balanceUsed, int couponUsed, String payChannel,
			Date payDatetime, String tradeNo, Date activateDatetime) {
		this.orderNo = orderNo;
		this.orderType = orderType;
		this.productNo = productNo;
		this.productType = productType;
		this.tenantId = tenantId;
		this.tenantCode = tenantCode;
		this.tenantAlias = tenantAlias;
		this.isolatedMode = isolatedMode;
		this.price = price;
		this.quantity = quantity;
		this.amount = amount;
		this.status = status;
		this.createBy = createBy;
		this.createDatetime = createDatetime;
		this.balanceUsed = balanceUsed;
		this.couponUsed = couponUsed;
		this.payChannel = payChannel;
		this.payDatetime = payDatetime;
		this.tradeNo = tradeNo;
		this.activateDatetime = activateDatetime;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 订单编号.
	 * @return 订单编号
	 */

	@Column(name = "ORDER_NO", unique = true, nullable = false, length = 50)
	public String getOrderNo() {
		return this.orderNo;
	}

	/**
	 * Set 订单编号.
	 * @param orderNo 订单编号
	 */
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	/**  
	 * Get 订单类型.
	 * @return 订单类型
	 */

	@Column(name = "ORDER_TYPE", nullable = false)
	public int getOrderType() {
		return this.orderType;
	}

	/**
	 * Set 订单类型.
	 * @param orderType 订单类型
	 */
	public void setOrderType(int orderType) {
		this.orderType = orderType;
	}

	/**  
	 * Get 产品编号.
	 * @return 产品编号
	 */

	@Column(name = "PRODUCT_NO", nullable = false, length = 50)
	public String getProductNo() {
		return this.productNo;
	}

	/**
	 * Set 产品编号.
	 * @param productNo 产品编号
	 */
	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	/**  
	 * Get 产品类型.
	 * @return 产品类型
	 */

	@Column(name = "PRODUCT_TYPE", nullable = false, length = 20)
	public String getProductType() {
		return this.productType;
	}

	/**
	 * Set 产品类型.
	 * @param productType 产品类型
	 */
	public void setProductType(String productType) {
		this.productType = productType;
	}

	/**  
	 * Get 租户ID.
	 * @return 租户ID
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 租户ID.
	 * @param tenantId 租户ID
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 租户编号.
	 * @return 租户编号
	 */

	@Column(name = "TENANT_CODE", nullable = false, length = 50)
	public String getTenantCode() {
		return this.tenantCode;
	}

	/**
	 * Set 租户编号.
	 * @param tenantCode 租户编号
	 */
	public void setTenantCode(String tenantCode) {
		this.tenantCode = tenantCode;
	}

	/**  
	 * Get 租户别名.
	 * @return 租户别名
	 */

	@Column(name = "TENANT_ALIAS", nullable = false, length = 50)
	public String getTenantAlias() {
		return this.tenantAlias;
	}

	/**
	 * Set 租户别名.
	 * @param tenantAlias 租户别名
	 */
	public void setTenantAlias(String tenantAlias) {
		this.tenantAlias = tenantAlias;
	}

	/**  
	 * Get 隔离级别.
	 * @return 隔离级别
	 */

	@Column(name = "ISOLATED_MODE", nullable = false)
	public int getIsolatedMode() {
		return this.isolatedMode;
	}

	/**
	 * Set 隔离级别.
	 * @param isolatedMode 隔离级别
	 */
	public void setIsolatedMode(int isolatedMode) {
		this.isolatedMode = isolatedMode;
	}

	/**  
	 * Get 价格.
	 * @return 价格
	 */

	@Column(name = "PRICE", nullable = false)
	public int getPrice() {
		return this.price;
	}

	/**
	 * Set 价格.
	 * @param price 价格
	 */
	public void setPrice(int price) {
		this.price = price;
	}

	/**  
	 * Get 购买份数.
	 * @return 购买份数
	 */

	@Column(name = "QUANTITY", nullable = false)
	public int getQuantity() {
		return this.quantity;
	}

	/**
	 * Set 购买份数.
	 * @param quantity 购买份数
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	/**  
	 * Get 总金额.
	 * @return 总金额
	 */

	@Column(name = "AMOUNT", nullable = false)
	public int getAmount() {
		return this.amount;
	}

	/**
	 * Set 总金额.
	 * @param amount 总金额
	 */
	public void setAmount(int amount) {
		this.amount = amount;
	}

	/**  
	 * Get 状态.
	 * @return 状态
	 */

	@Column(name = "STATUS", nullable = false)
	public int getStatus() {
		return this.status;
	}

	/**
	 * Set 状态.
	 * @param status 状态
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	/**  
	 * Get 创建人.
	 * @return 创建人
	 */

	@Column(name = "CREATE_BY", nullable = false)
	public int getCreateBy() {
		return this.createBy;
	}

	/**
	 * Set 创建人.
	 * @param createBy 创建人
	 */
	public void setCreateBy(int createBy) {
		this.createBy = createBy;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 余额支付额.
	 * @return 余额支付额
	 */

	@Column(name = "BALANCE_USED", nullable = false)
	public int getBalanceUsed() {
		return this.balanceUsed;
	}

	/**
	 * Set 余额支付额.
	 * @param balanceUsed 余额支付额
	 */
	public void setBalanceUsed(int balanceUsed) {
		this.balanceUsed = balanceUsed;
	}

	/**  
	 * Get 优惠券支付额.
	 * @return 优惠券支付额
	 */

	@Column(name = "COUPON_USED", nullable = false)
	public int getCouponUsed() {
		return this.couponUsed;
	}

	/**
	 * Set 优惠券支付额.
	 * @param couponUsed 优惠券支付额
	 */
	public void setCouponUsed(int couponUsed) {
		this.couponUsed = couponUsed;
	}

	/**  
	 * Get 付款通道.
	 * @return 付款通道
	 */

	@Column(name = "PAY_CHANNEL", nullable = false, length = 50)
	public String getPayChannel() {
		return this.payChannel;
	}

	/**
	 * Set 付款通道.
	 * @param payChannel 付款通道
	 */
	public void setPayChannel(String payChannel) {
		this.payChannel = payChannel;
	}

	/**  
	 * Get 付款时间.
	 * @return 付款时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "PAY_DATETIME", length = 19)
	public Date getPayDatetime() {
		return this.payDatetime;
	}

	/**
	 * Set 付款时间.
	 * @param payDatetime 付款时间
	 */
	public void setPayDatetime(Date payDatetime) {
		this.payDatetime = payDatetime;
	}

	/**  
	 * Get 交易号.
	 * @return 交易号
	 */

	@Column(name = "TRADE_NO", length = 50)
	public String getTradeNo() {
		return this.tradeNo;
	}

	/**
	 * Set 交易号.
	 * @param tradeNo 交易号
	 */
	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	/**  
	 * Get 激活时间.
	 * @return 激活时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ACTIVATE_DATETIME", length = 19)
	public Date getActivateDatetime() {
		return this.activateDatetime;
	}

	/**
	 * Set 激活时间.
	 * @param activateDatetime 激活时间
	 */
	public void setActivateDatetime(Date activateDatetime) {
		this.activateDatetime = activateDatetime;
	}

}
